1. Field of the Invention
The present invention relates to an information processing apparatus and information processing method for performing image processing, and a storage medium storing a program.
2. Description of the Related Art
In recent years, multi-function mobile phones (to be referred to as mobile computers hereinafter) incorporating a camera function have become widespread, and far surpass digital cameras and conventional personal computers (to be referred to as PCs hereinafter) in sales. The system of such a mobile computer is basically formed from three elements, that is, hardware as the computer itself, an operating system (to be referred to as an OS hereinafter) operating on the hardware, and an application operating on the OS. The user can activate a map, mail, or browser by using the application, and perform an operation such as browsing of a Web site on the Internet. As examples of the form of such an application operating on the mobile computer, there are mainly two application forms, that is, a native application and a Web application. The features of each application will be explained below.
The native application is normally developed in a development environment and development language which are prepared for each OS. For example, the C/C++ language is used on an OS provided by company A, the Java® language is used on an OS provided by company B, and a different development language is used on an OS provided by company C. In this way, the native application is developed in a different development language for each OS. The native application is compiled (translated) in advance in each development environment, and converted by an assembler from a so-called high-level language understandable by a human into instruction sets interpretable by the CPU of the computer. Thus, the native application has an advantage that a high-speed operation is possible because the CPU directly interprets instructions.
The Web application is an application operating on a Web browser which is normally incorporated in an OS on a computer. The Web application is generally developed using a language such as HTML5, CSS, or JavaScript® so as to enable interpretation by the Web browser. These languages are Web standard languages. Thus, once the application is described, it can operate in any environment where the Web browser operates. Japanese Patent Laid-Open No. 2013-80470 discloses an example of the Web application form. The body of the Web application described in HTML5, CSS, or JavaScript resides in a server outside a mobile computer. Since the Web application is downloaded from the server to the mobile computer via Internet connection at the time of use, the user can dynamically change a user interface (UI) design or the like without compiling the application in advance.
Recently, various kinds of OSs are used as the mobile computers have become widespread. Hence, an important challenge in software development is how to develop applications that operate on the OSs in a short time and offer them to users speedily. To solve this problem, a method called cross development is used. Cross development is a method of developing most parts of an application using a common program language cross-sectionally usable for various OSs. Since the program language is common, this method does not require processes for individual development for each OS, and is known as an effective application development method.
Hence, the Web application is a method of solving the above-described problem. However, the Web application operates on the browser and cannot therefore be distributed from application stores run by vendors as a native application. For this reason, a cross development method in a native application style that can be distributed from the stores is becoming necessary.
As one of cross development methods capable of store distribution, a hybrid application as described in Japanese Patent Laid-Open No. 2013-80470 has received attention. In the hybrid application, the application itself is distributed to users as the above-described native application. However, all or most of user interfaces (UIs) are described as a feature in a so-called Web standard language such as HTML5, CSS3, or JavaScript. That is, one application includes a native layer and a script layer using a Web standard language. When such a configuration is employed, it is possible to configure software which makes use of both the advantage of the native application and that of the Web application.
However, when applying the above-described hybrid application to a print application to print a photo or document, the following problems arise.
In a normal hybrid application, a UI portion is described in a Web standard language and held in the application as text data. This text data is called a script. This script is input to an engine (interpreter) used to translate and execute scripts held in the OS when the application is activated. As a result, the UI screen is displayed on the screen of the mobile computer so as to be operable by the user.
Considering a photo print application, for example, the software needs to be built so that a print target photo is drawn on the UI screen and the user can superimpose date information such as a shooting date/time and a stamp such as a pictorial symbol on the photo and print the result. In the hybrid application, drawing of such print content is also described using the Web standard language. To print an image and stamp image drawn on the UI screen, this print content needs to be converted into bitmap data for printing. This processing is called rendering processing.
When performing the rendering processing using the Web standard language, there is generally a constraint which inhibits secondary use of image data held on the script layer side except for screen drawing.
This constraint exists as a constraint imposed when images inside and outside a terminal are handled using the Web standard language. In the HTML, image data can be obtained as an Image object by designating the file path of an image. A memory is reserved using a canvas function, and the Image object can be drawn on the UI screen by the API of the canvas.
However, when image data is obtained by the above-described method, there is a constraint in which it is impossible to extract data from an Image object and perform conversion processing. For example, there is a constraint in which neither the toBlob function nor toDataURL function can be used. This HTML-specific phenomenon is caused by a rule made to prevent secondary use of an image from an external Web site.
In some cases, when the hybrid application is applied to the photo print application, an application function of obtaining and printing image data cannot be implemented owing to the generally present constraint.